package com.bootdo.analyze.controller;

import com.bootdo.analyze.dao.SupplierFormDao;
import com.bootdo.analyze.domain.SellOrderDO;
import com.bootdo.analyze.domain.SupplierFormDO;
import com.bootdo.analyze.service.SellOrderService;
import com.bootdo.analyze.service.SupplierFormService;
import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.Query;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 *
 * 
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2020-03-02 10:02:27
 */
 
@Controller
@RequestMapping("/analyze/supplierform")
public class SupplierFormController {
	@Autowired
	private SupplierFormService supplierFormService;


	/**
	 * 进价报表（按供应商）
	 * @return
	 */
	@ResponseBody
	@GetMapping("/supplierstocklist")
	public PageUtils supplierList(@RequestParam Map<String, Object> params){
		//查询列表数据
		Query query = new Query(params);
		List<SupplierFormDO> supplierList = supplierFormService.list(query);
		int total = supplierFormService.count(query);
		PageUtils pageUtils = new PageUtils(supplierList, total);
		return pageUtils;
	}




	

	
}
